Chain up relevant GObjectClass:notify vfuncs
authorClaudio Saavedra <csaavedra@igalia.com>
Wed, 4 Apr 2012 08:10:44 +0000 (11:10 +0300)
committerClaudio Saavedra <csaavedra@igalia.com>
Tue, 7 Aug 2012 15:14:56 +0000 (18:14 +0300)
These widgets have ancestors other than GObject which could eventually
implement the notify vfunc for their properties. For correctness, they
should chain up the notify vfunc.

https://bugzilla.gnome.org/show_bug.cgi?id=673478

gtk/gtksocket.c
gtk/gtktoolitem.c

index 5e2a770c14129f137670664bb9e4f3a8536a7cb9..c7876364506ad61d7fd15595c6d18192cd7eefe5 100644 (file)
@@ -914,6 +914,9 @@ gtk_socket_notify (GObject    *object,
 {
   if (strcmp (pspec->name, "is-focus") == 0)
     socket_update_focus_in (GTK_SOCKET (object));
+
+  if (G_OBJECT_CLASS (gtk_socket_parent_class)->notify)
+    G_OBJECT_CLASS (gtk_socket_parent_class)->notify (object, pspec);
 }
 
 /**
index adae769eb16e2d58a62447debae5db96f43490ff..26ad1402f7c4b1904edd725086c919c321a26b2d 100644 (file)
@@ -400,6 +400,9 @@ gtk_tool_item_property_notify (GObject    *object,
   if (tool_item->priv->menu_item && strcmp (pspec->name, "sensitive") == 0)
     gtk_widget_set_sensitive (tool_item->priv->menu_item,
                              gtk_widget_get_sensitive (GTK_WIDGET (tool_item)));
+
+  if (G_OBJECT_CLASS (gtk_tool_item_parent_class)->notify)
+    G_OBJECT_CLASS (gtk_tool_item_parent_class)->notify (object, pspec);
 }
 
 static void